package cn.alex.sso.project.entity;

import cn.alex.sso.framework.core.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 部门表
 *
 * @author Alex
 * @TableName sys_dept
 */
@Data
@TableName(value = "sys_dept")
public class SysDept extends BaseEntity implements Serializable {
    /**
     *
     */
    @TableId
    private Long id;

    /**
     * 部门名称
     */
    private String name;

    /**
     * 部门描述
     */
    private String description;

    /**
     * 父级ID，-1为最顶级部门
     */
    private Long parentId;

    /**
     * 排序
     */
    private Integer sorted;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 修改时间
     */
    private Date updatedTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private List<SysDept> children;
}